/**
 * Created by Administrator on 2017/3/21.
 */
import React, {Component} from 'react';
import {
  Form, Input, Radio, Select, Icon,
  Upload, Descriptions, DatePicker,
} from 'antd';
import {connect} from 'dva';
import moment from 'moment'
import request from '@/utils/request';
import ZImg from 'react-zmage';
const FormItem = Form.Item;
const { TextArea } = Input;
const RadioGroup = Radio.Group;
const Option = Select.Option;
class AddPoliciesForm extends Component {
  constructor(props) {
    super(props);
    this.state = {
      fileList:[],
      all_staffs:[],
    };
  }

  componentDidMount() {
    const that=this;
    request(`/all_staffs`, {
      method: 'GET',
    }).then((response)=> {
      console.log('all_structures', response)
      if(response.status===200){
        that.setState({
          all_staffs:response.data.data
        })
      }
    })
  }
  render() {
    const formItemLayoutWithLabel = {
      labelCol: {
        xs: {span: 24},
        sm: {span: 6},
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 15},
      }
    };

    const {getFieldDecorator} = this.props.form;
    return (
      <div>
        <Form>
          <Descriptions  column={4}   className={'blue-descriptions'}
                         title={<div style={{textAlign:'center'}}>车辆信息</div>} bordered>
            <Descriptions.Item label="车辆照片"  span={2}>
              <ZImg style={{height:'60px'}} src={'https://img1.bitautoimg.com/autoalbum/files/20210619/45/20210619428_8.jpg'}/>
            </Descriptions.Item>
            <Descriptions.Item label="车牌号"  span={2}>
              粤A235645
            </Descriptions.Item>
            <Descriptions.Item label="车辆编号"  span={2}>
              <div style={{width:'200px'}}>2021212122</div>
            </Descriptions.Item>
            <Descriptions.Item label="品牌"  span={2}>
              <div style={{width:'200px'}}>丰田</div>
            </Descriptions.Item>
            <Descriptions.Item label="车辆类型"  span={2}>
              SUV
            </Descriptions.Item>
            <Descriptions.Item label="乘坐人数"  span={2}>
              5
            </Descriptions.Item>

          </Descriptions>
          <Descriptions  column={4}   className={'blue-descriptions'} style={{marginTop:'10px'}}
                         title={<div style={{textAlign:'center'}}>预定信息</div>} bordered>
            <Descriptions.Item label="部门"  span={2}>
              <div style={{width:'200px'}}>维修部</div>
            </Descriptions.Item>
           、 <Descriptions.Item label="申请人"  span={2}>
              <div style={{width:'200px'}}>买买提</div>
            </Descriptions.Item>
            <Descriptions.Item label="开始时间"  span={2}>
              2021-05-21 12:12:21
            </Descriptions.Item>
            <Descriptions.Item label="结束时间"  span={2}>
              2021-05-21 12:12:21
            </Descriptions.Item>
            <Descriptions.Item label="事由"  span={4}>
             出差
            </Descriptions.Item>
          </Descriptions>

          <Descriptions  column={4}   className={'blue-descriptions'} style={{marginTop:'10px'}}
                         title={<div style={{textAlign:'center'}}>审批意见</div>} bordered>
            <Descriptions.Item label="是否同意"  span={4}>
              {getFieldDecorator('status', {
                initialValue: 4,
              })(
                <Radio.Group>
                  <Radio value={4}>同意</Radio>
                  <Radio value={3}>不同意</Radio>
                </Radio.Group>,
              )}
            </Descriptions.Item>
            <Descriptions.Item label="审批备注"  span={4}>
              {getFieldDecorator('mobile', {
                initialValue:this.props.editRecord?this.props.editRecord.mobile:'',
              })(
                <Input/>
              )}
            </Descriptions.Item>
          </Descriptions>
        </Form>
      </div>
    );
  }
}

const AddPoliciesFormWrap = Form.create()(AddPoliciesForm);
export default connect()(AddPoliciesFormWrap);


